<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{
            margin:0;
            padding: 0;
        }
        section {
            width: 100%;
            /*保证盒子内容在合理的范围之内*/
            max-width: 980px;
            min-width: 320px;
        }

        section div {
            width: 50%;
            height: 400px;
        }

        section div:nth-child(1) {
            float: left;
            background-color: pink;
        }

        section div:nth-child(2) {
            float: left;
            background-color: red;
        }
    </style>
</head>
<body>
<section>
    <div></div>
    <div></div>
</section>
</body>
</html>